Applying Imperfect Patches

Contents|Index|Previous|Next

Applying Imperfect Patches

patch tries to skip any leading text in the patch file, apply the diff, and then skip any trailing text. Thus you can feed a news article or mail message directly to patch, and it should work. If the entire diff is indented by a constant amount of white space, patch automatically ignores the indentation. However, certain other types of imperfect input require user intervention. See Applying Patches with Changed White Space, Applying Reversed Patches and Helping patch Find Inexact Matches for more details.